package models;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class ServiceAssociationId implements Serializable
{
	public long serviceId;
	public long userId;
	
	public int hashCode() {
		return (int) (serviceId + userId);
	}
	
	public boolean equals(Object o) {
		if (o instanceof ServiceAssociationId) {
			ServiceAssociationId otherId = (ServiceAssociationId) o;
			return otherId.serviceId == this.serviceId && otherId.userId == this.userId;
		}
		
		return false;
	}
}